<ul>
{foreach $tree as $nav}
    {!empty $nav['children']:}
    <li id="{$nav.id}" class="collapse-node collapse-hide">
        <span></span>
        <a href="{:url('doc/edit',['id'=>$nav['id']])}" title="{$nav.title}">
            {$nav.title}
            {if $nav['is_new']==1:}<img src="__STATIC__/img/new.gif" alt="new">{/if}
        </a>
        <ul>
        {foreach $nav['children'] as $nv}
            <li id="{$nv.id}" {if $nv['id']==$doc_id:}class="readed"{/if}>
                <a href="{:url('doc/edit',['id'=>$nv['id']])}" title="{$nv.title}" {if $nv['id']==$doc_id:}class="jstree-clicked"{/if}>
                    {$nv.title}
                    {if $nv['is_new']==1:}<img src="__STATIC__/img/new.gif" alt="new">{/if}
                </a>
            </li>
        {/foreach}
        </ul>
    </li>
    {else:}
    <li id="{$nav.id}" {if $nav['id']==$doc_id:}class="readed"{/if}>
        <a href="{:url('doc/edit',['id'=>$nav['id']])}" title="{$nav.title}" {if $nav['id']==$doc_id:}class="jstree-clicked"{/if}>
            {$nav.title}
            {if $nav['is_new']==1:}<img src="__STATIC__/img/new.gif" alt="new">{/if}
        </a>
    </li>
    {/empty}
{/foreach}
</ul>